package cn.samler.diandi.api.model.io.request.post;

import cn.samler.diandi.api.annotation.IsRole;
import cn.samler.diandi.api.model.io.request.pub.Point;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class Search {
    @IsRole
    private String role;

    @Valid
    @NotNull(message = "坐标不能为空")
    private Point position;

    @NotBlank(message = "搜索内容不能为空")
    private String keyword;

    @NotNull(message = "tag must be not null")
    private List<String> tag;

    private String sort;
}
